package com.supermap.application.controller;


import com.supermap.application.entity.TIndustry;
import com.supermap.application.service.IndustryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author sun'f
 * @day 2019-02-19
 * @version 1.0
 * @name 行业相关控制层,禁止写业务层代码
 *
 */
@Controller
@RequestMapping(value = "/industry")
public class IndustryController {

    @Autowired
    IndustryService industryService;

    @RequestMapping(value = "get/code")
    @ResponseBody
    public TIndustry getIndustryByCode(String code){
        if (code == null) {
            return new TIndustry();
        }else {
            return industryService.getIndustryByCode(code);
        }
    }

}
